import HomePage from "@/views/HomePage.vue";
import LookForHousing from "@/views/LookForHousing.vue";
// 二级路由
import Region from "@/views/seconds/Region.vue";
import Way from "@/views/seconds/Way.vue";
import Rent from "@/views/seconds/Rent.vue";
import Screen from "@/views/seconds/Screen.vue";

// 内容
import Content from "../views/Content.vue";

import InForMation from "@/views/InForMation.vue";
import MyInformation from "@/views/MyInformation.vue";

const routes = [
    {
        path: '/',
        // 重定向
        redirect: '/homePage',
    },
    {
        path: '/homePage',
        name: 'homePage',
        component: HomePage,
    },
    {
        path: '/lookForHousing',
        name: 'lookForHousing',
        component: LookForHousing,
        // 重定向
        // redirect: '/rent',
        // 配置二级路由规则
        childern: [
            {
                path: 'region',
                component: Region,
            },
            {
                path: 'way',
                component: Way,
            },
            {
                path: 'rent',
                component: Rent,
            },
            {
                path: 'screen',
                component: Screen,
            },
        ]
    },
    {
        path: '/inForMation',
        name: 'inForMation',
        component: InForMation,
    },
    {
        path: '/myInformation',
        name: 'myInformation',
        component: MyInformation,
    },
    {
        path: '/content',
        name: 'content',
        component: Content,
    },
]

export default routes